﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sisocana.Core.Models.NoticiaAsociadaModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit news Source
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2> Edit news Source</h2>
   <script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.js") %>" type="text/javascript"></script>
    <link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("p a, input:submit,input:file ").button();
        });
    </script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
            $(document).ready(function () {

            $( "#slider-amount" ).slider({
			        range: "min",			
			        min: 1,
			        max: 20,
			        change: function( event, ui ) {
				        $( "#lcantVisualizar" ).text("Display "+ $( "#slider-amount" ).slider( "value" ) + " elements");
                        $( "#cantVisualizar" ).val($( "#slider-amount").slider( "value" ) );

                    },
                    create: function( event, ui ) {
				        var valor =$( "#cantVisualizar" ).val();
                        $( "#slider-amount" ).slider( "option", "value", valor );
			        }
            
		        });
		        $( "#lcantVisualizar").text("Display Amount " + $( "#slider-amount").slider( "value" ) + " elements");
                $( "#cantVisualizar").val($( "#slider-amount").slider( "value" ) );
            });
    </script>

<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    

        <%: Html.HiddenFor(model => model.idSitio)  %>
        <%: Html.HiddenFor(model => model.id)  %>       

        <div class="editor-label">
            <%: Html.LabelFor(model => model.NoticiaNombre,"News source") %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.NoticiaNombre, new { disabled = "disabled", @readonly = "readonly" })%>
            <%: Html.ValidationMessageFor(model => model.NoticiaNombre) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.urlfeed,"Url Feed") %>
        </div>
        <div class="editor-field">
           <%: Html.TextBoxFor(model => model.urlfeed, new { disabled = "disabled", @readonly = "readonly" })%>
            <%: Html.ValidationMessageFor(model => model.urlfeed) %>
        </div>

        <div class="editor-label">
            <label id="lcantVisualizar" ></label>
        </div>
        <div class="editor-field">
            <%: Html.HiddenFor(model => model.cantVisualizar) %>
            <div id="slider-amount" class="customSlider"></div>   
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.tagBusqueda, "Search tag") %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.tagBusqueda) %>
            <%: Html.ValidationMessageFor(model => model.tagBusqueda) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.showDesc,"Show description?") %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.showDesc) %>
            <%: Html.ValidationMessageFor(model => model.showDesc) %>
        </div>

        <p>
            <input type="submit" value="Update" />
        </p>
   
<% } %>

<div>
    <% if (Model != null)
       { %>
    <%: Html.ActionLink("Back to List", "Conf", new { idsitio = Model.idSitio, tab = 7 })%>
    <% } %>
</div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
